Page({
    data: {
        items: [
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/630809ad6893356c8ece6459d81e37a3.png',
                name: '【ASC认证】鲜活净化乳山肥蚝两只300g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a1.png',
                name: '鲜活波士顿龙虾1只750g-900g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a2.png',
                name: '冰鲜笔管鱿鱼280g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a3.png',
                name: '东海海捕三去带鱼段800g'
            }
        ],
        items_1: [
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/15291fdf78931530913f4139724f6454.png',
                name: '白山灵芝孢子粉220g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a4.png',
                name: '黄松甸木耳500g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a5.png',
                name: '吉林东丰鹿茸250g'
            },
            {
                img: 'https://cayon.oss-cn-hangzhou.aliyuncs.com/mall/%E5%9B%BE%E7%89%87/a6.png',
                name: '吉林东丰鹿油500g'
            }
        ],
        oneHeight: 0,
        oneTop: 0,
        headerHeight: 0,
    },
    onLoad() {
        let menuRect = wx.getMenuButtonBoundingClientRect();
        let deviceWidth = wx.getSystemInfoSync().windowWidth;
        let rpx = (750 / deviceWidth) * Number(menuRect.height + menuRect.top);
        let headerHeight = Math.floor(rpx);
        this.setData({
            oneHeight: menuRect.height,
            oneTop: menuRect.top,
            headerHeight: headerHeight,
        })
    },
    onShareAppMessage() {
        return {};
    },
    goBack() {
        wx.navigateBack({
            delta: 1
        });
    },
    jumpToCha() {
        wx.navigateTo({
            url: '/pages/cha/cha'
        })
    }
});
